import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: () => import(/* webpackChunkName: "home" */ '../views/Home.vue')
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import(/* webpackChunkName: "login" */ '../views/Login.vue')
    },
    {
        path: '/admin',
        name: 'Admin',
        component: () => import(/* webpackChunkName: "admin" */ '../views/admin/admin.vue'),
        children: [
            {
                path: 'home',
                name: 'Home',
                component: () => import(/* webpackChunkName: "admin" */ '../views/admin/Home.vue')
            },
            {
                path: 'task_management',
                name: 'TaskManagement',
                component: () => import(/* webpackChunkName: "task_management" */ '../views/admin/TaskManagement.vue')
            }
        ]
    }
]

const router = new VueRouter({
    routes
})

export default router
